package lanxing.future.base.chapter10;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年8月3日
 *
 */
public class Pacel19 {
    public Destination destination(String dest) {
        return new Destination() {
//            dest = "xxx";
            
            private String label = dest;
            
            //String dest = "lanxing2";
            
            public String readLabel() {
                return label;
            }
        };
    }

    public static void main(String[] args) {
        Pacel19 p = new Pacel19();
        Destination destination = p.destination("lanxing");

        System.out.println(destination.readLabel());
    }
}
